package com.zzyl.nursing.controller.member;

import com.zzyl.common.core.domain.AjaxResult;
import com.zzyl.nursing.service.IMemberReservationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import static com.zzyl.common.core.domain.AjaxResult.success;

@RestController
@RequestMapping("/member/reservations")
@Api(tags = "参观预约")
public class MemberReservationController {

    @Autowired
    private IMemberReservationService memberReservationService;

    @ApiOperation("查询取消预约数量")
    @GetMapping("/cancelled-count")
    public AjaxResult cancelledCount(){
            int count = memberReservationService.cancelledCount();
        return success(count);
    }
}
